
#ifndef BOX_H_
#define BOX_H_

#include "../Packets/BackSubPkt.h"
#include "../Packets/PubPkt.h"
#include "../Packets/UnSubPkt.h"
#include <set>


class Inbox {
public:
	Inbox(int parClient, BackSubPkt* parPkt);
	Inbox(int parClient, UnSubPkt* parPkt);
	virtual ~Inbox();
	BackSubPkt* getSubPkt(){ return subPkt; }
	UnSubPkt* getUnSubPkt(){ return unSubPkt; }
	int getClient(){ return client;	}
private:
	int client;
	BackSubPkt *subPkt;
	UnSubPkt *unSubPkt;
};


class Outbox {
public:
	Outbox(){}
	Outbox(std::set<int> parClients, std::set<PubPkt*> parPkts);
	virtual ~Outbox();
    std::set<int> getClients();
    std::set<PubPkt*> getPkts();
    int getNs() const;
    float getWs() const;
    void setNs(int ns);
    void setWs(float ws);
    float getLastPercentage() const;
    void setLastPercentage(float lastPercentage);
    std::set<PubPkt*> pkts;
	std::set<int> clients;
private:
    //usate solo in combinazione con OMP
    float ws;
    int ns;
    float lastPercentage;
};



#endif /* BOX_H_ */
